<template>
    <div class="container" style="position: relative">
        <video autoplay muted loop src="../../assets/second_center_video.mp4"></video>
        <div class="side"></div>
<!--        <div class="title" style="top: 94px;">{{label1}}</div>-->
<!--        <div class="title" style="top: 690px;left:70px;text-align:left">{{label3}}</div>-->
<!--        <div class="title" style="top: 690px;right:70px;text-align:right">{{label4}}</div>-->
         <div class="triangle" :style="{'--rcjg': '\'' + (label3 || ' ' )+ '\'', '--rcfzhj': '\'' + (label4 || ' ') + '\''}">

      <!--        <div class="triangle" :style="{'&#45;&#45;rcjg': '\'' + (data.rcjg || ' ' )+ '\'', '&#45;&#45;rcfzhj': '\'' + (data.rcfzhj || ' ') + '\''}">-->
              <!--            <div> {{data.rcqzhy || ' '}}</div>-->
              <div >{{label1}}</div>
            <div class="number" style="margin-top:120px"> {{data.rlzyhy || ' '}}</div>
            <div class="label" style="display: flex; justify-content: center"  @mouseenter="isshow=true" >{{label2}}<span class="tooltipbox"></span></div>
           <div class="popbox" v-if="isshow" @mouseleave="isshow=false">
             <h2>说明</h2>
             <div class="popcontent">
               <h3>{{ tableData.title }}				</h3>
               <div class="wrap-column-box" >
                 <div class="wrap-table head" >
                   <table style="width:100%;border-spacing: 0">
                     <colgroup>
                       <col style="width: 10%"/>
                       <col style="width: 10%"/>
                       <col style="width: 10%"/>
                       <col style="width: 10%"/>
                       <col style="width: 10%"/>
                       <col style="width: 50%"/>
                     </colgroup>
                     <thead>
                     <tr>
                       <th>指标分类</th>
                       <th>指标名称</th>
                       <th>分类权重</th>
                       <th>指标权重</th>
                       <th>基准值</th>
                       <th>计分规则</th>
                     </tr>
                     </thead>
                   </table>
                 </div>
                 <div class="wrap-table body" style="height:400px; overflow: auto">
                   <table style="width:100%;border-spacing: 2px">
                     <colgroup>
                       <col style="width: 10%"/>
                       <col style="width: 10%"/>
                       <col style="width: 10%"/>
                       <col style="width: 10%"/>
                       <col style="width: 10%"/>
                       <col style="width: 50%"/>
                     </colgroup>
                     <tr v-for="(item,index) in tableData.value" :key="index">
                       <!--                <td>{{ index < 9 ? '0' + (index + 1) : index + 1 }}</td>-->
                       <td>{{ item.type }}</td>
                       <td>{{ item.name }}</td>
                       <td>{{ item.flqz }}</td>
                       <td>{{item.zbqz}}</td>
                       <td>{{item.jzz}}</td>
                       <td><p>{{item.jfgz}}</p></td>
                     </tr>

                   </table>
                 </div>
               </div>
             </div>
           </div>
        </div>
    </div>
</template>
<script>
export default {
  data () {
    return {
      isshow:false
    }
  },
    props: {
        data: Object,
        label1: String,
        label2: String,
        label3: String,
        label4: String,
        tableData:Object

    }
}
</script>
<style lang="less" scoped>
.container {
    position:  relative;
    width: 736px;
    height: 940px;
    box-sizing: border-box;
}
video {
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    mix-blend-mode: screen;
}
.side {
    position: relative;
    height: 100%;
    background-image: url('../../assets/center_top_left.png');
    background-repeat: no-repeat;
    background-position: left center;
    background-size: 258px auto;
    &::before {
      content: " ";
      position: absolute;
      width: 258px;
      background-position: right center;
      height: 100%;
      background-image: url('../../assets/center_top_right.png');
      background-repeat: no-repeat;
      background-size: 258px auto;
      right: 0;
    }
  }
  .title {
    font-family: PingFangSC-Regular;
    font-size: 20px;
    color: #FFFFFF;
    letter-spacing: 0;
    text-align: center;
    font-weight: 400;
    position: absolute;
    width: 100%;

  }
  .triangle {
    width: 466px;
    height: 516px;
    background-image: url('../../assets/tirangle.svg');
    background-size: 466px auto;
    background-position: center;
    background-repeat: no-repeat;
    left: calc(50% - 233px);
    position: absolute;
    top: 132px;
    font-family: DINPro-Medium;
    font-size: 20px;
    color: #fff;
    text-align: center;
    line-height: 128px;
    letter-spacing: 1.92px;
    font-weight: 500;
    &::before {
        content: var(--rcjg);
        width: 128px;
        height: 128px;
        line-height: 18px;
      display: flex;
      justify-content: center;
      align-items: center;
        background-repeat: no-repeat;
        background-image: url('../../assets/triangle_left.svg');
        position: absolute;
        bottom: -32px;
        left: -64px;
    }
    &::after {
        content: var(--rcfzhj);
        width: 128px;
        height: 128px;
        line-height: 18px;
        display: flex;
        justify-content: center;
        align-items: center;
        background-repeat: no-repeat;
        background-image: url('../../assets/triangle_right.svg');
        position: absolute;
        bottom: -32px;
        right: -64px;

    }
  }
  .number {
    font-family: LetsgoDigital-Regular;
    font-size: 72px;
    color: #64E6E2;
    letter-spacing: 0;
    text-align: center;
    line-height: 76px;
    font-weight: 700;
  }
  .label {
    font-family: PingFangSC-Regular;
    font-size: 20px;
    color: #FFFFFF;
    letter-spacing: 0;
    text-align: center;
    line-height: 26px;
    font-weight: 400;
    white-space: pre-line;
  }
  .tooltipbox{
    width:40px;
    height:40px;
    background:url("../../assets/tooltip.svg") no-repeat center;
    cursor: pointer;
  }
.popbox{
  width:800px;
  height:550px;
  position: absolute;
  left:-180px;
  top:-200px;
  background-color: #01182A;
  background-image: url("../../assets/lefttop.svg"),url("../../assets/righttop.svg"),url("../../assets/leftbottom.svg"),url("../../assets/rightbottom.svg"),;
  background-repeat: no-repeat,no-repeat,no-repeat,no-repeat;
  background-position: left top,right top,left bottom,right bottom;
  border: 1px solid rgba(35,81,184,1);
  z-index: 9999999;
  .popcontent{
    padding:20px;
    overflow: hidden;
    z-index: 9999999;
    h3{
      line-height: 24px;
      margin: 0;
      padding: 0;
      text-align: left;
      font-size:18px;
      font-weight: bold;
    }
    p{
      line-height: 24px;
      margin:0;
      padding-left:10px;
      font-size:16px;
      color:#fff;
      text-align: left;

    }
  }

}
.popbox h2{
  width:100%;
  height:40px;
  line-height: 40px;
  font-size: 18px;
  margin:0;
  padding:0;
  background-image: linear-gradient(269deg, rgba(0,178,255,0.00) 0%, rgba(8,132,255,0.24) 51%, rgba(0,178,255,0.00) 100%);
  position: relative;
  &:after{
    content: 'X';
    width:32px;
    height:32px;
    color:#fff;
    font-size:16px;
    position: absolute;
    right:10px;
    top:0;
    cursor: pointer;
  }
}
.wrap-column-box{
  margin-top:20px;
  margin-bottom:20px;
}
.wrap-table table{
  width:100%;
  border-spacing:0
}
.wrap-table.body tr{
  border-spacing:5px;
  margin-bottom:2px;
}
.wrap-table.head tr th{
  height:40px;
  line-height: 40px;
  text-align: center;
  font-size: 16px;
  color: #fff;
  background: rgba(8,132,255,.2)
}
.wrap-table.body tr td {
  font-size: 16px;
  padding: 5px 0;
  color: rgba(255,255,255,0.72);
  text-align: center;
  background: rgba(8,132,255,.12);
  line-height: 20px;
}
.wrap-table.body tr td p{
  //width: 160px;
  //white-space: nowrap;
  //overflow: hidden;
  //text-overflow: ellipsis;
}
</style>
